﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    <div id="exportDiv">
        <fieldset title="Export" style="width:300px;float:left;height:200px;">        
            <legend>Export</legend>
            <input type="button" id="ExportButton" value="Export" onclick="Export()" />
        </fieldset>
    </div>

    <div id="importDiv">
        <fieldset title="Import" style="float:left;height:200px;">
            <legend>Import</legend>
            <% using (Html.BeginForm("RunImport", "Exim", FormMethod.Post, new { enctype = "multipart/form-data", @id = "formImport" }))
               { %>
            <div>
                File Upload: <input id="importFile" name="importFile" type="file" />
            </div>
            <input type="submit" id="ImportButton" value="Import" />
            <% } %>
        </fieldset>
    </div>

    <script language="javascript" type="text/javascript">
        function Export() {
            window.location = '<%= Url.Action("RunExport", "Exim") %>';
        }
        function ShowImageProcessing() {
            $('img[id$=Ajax]').show();
        }
        function HideImageProcessing(response) {
            document.write(response.data);
            $('img[id$=Ajax]').hide();
        }        
    </script>
</asp:Content>
